import 'package:flutter/material.dart';
import 'package:flutter_app/global/color_config.dart';
import 'package:flutter_app/login/event/login_event.dart';
import 'package:flutter_app/util/event_util.dart';

class RegisterPageViewWidget extends StatefulWidget {
  const RegisterPageViewWidget({super.key});

  @override
  RegisterPageViewPage createState() => RegisterPageViewPage();
}

class RegisterPageViewPage extends State<RegisterPageViewWidget> {
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      height: double.infinity,
      child: Container(
        padding: const EdgeInsets.only(top: 70),
        child: Column(
          children: [
            InkWell(
              onTap: () {
                print("跳转到登录");
                EventUtil.getEvent.fire(LoginEvent(0));
              },
              child: Row(
                mainAxisSize: MainAxisSize.max,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  const Image(
                    image: AssetImage("images/icon_goto_login.png"),
                    width: 12,
                    height: 12,
                  ),
                  Text(
                    " 去登录",
                    style:
                        TextStyle(color: ColorConfig.themeColor, fontSize: 14),
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
